<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>首页</title>
<#include "/common/head.html" />
<link rel="stylesheet" href="${rootpath}/resources/css/main.css" />
</head>
<script>
	var rootPath = '${rootpath}';
</script>
<body>
	<form>
		<div>
			<span>User:</span><input type="text" id="account" name="account"></input>
		</div>
		<div>
			<span>Password:</span><input type="password" id="password"
				name="password"></input>
		</div>
		<div>
			<button id="btnLogin">登录</button>
		</div>
	</form>
</body>
<script>
	$(function() {
		$('#btnLogin').click(function() {
			$.post('/signin', {
				password : $('#password').val(),
				account : $('#account').val()
			}).then(function(d) {
				if (d == 1) {
					window.location.href = '/home/';
					return;
				}
				alert('登录失败');
			});
			return false;
		})

	});
</script>
</html>